Multiple versions of web sites are commonly available. The different versions of the web sites are generally geared toward accommodating different client device and browser capabilities. A common example is providing both a standard desktop/PC version of a web site and a mobile version of the web site, with the latter usually being a scaled down or reformatted version of the web site optimized for smaller devices and different versions of web browsers.
Conventionally an automatic mobile browser detection mechanism is employed on the server-side. An example is using a server-side script that detects browser types of the requesting client device and redirects the request, if appropriate, to an alternate version (e.g. mobile version) of the web site requested. Existing solutions thus focus on a server-side approach where detection is made as to browser/device capabilities and an appropriate version of the web site is sent to the client device in response to its web site request.
In a response to all web site requests, HTTP headers are sent from the server to the requesting client device. The HTTP headers essentially describe the connection and are followed by the content of the response, including HTML content. The HTML content includes sections, one of which is the HEAD section, which includes various non-displayed data. The HEAD section is in turn followed by the body section, which includes displayable data. A server may conventionally utilize HTTP headers to provide redirects to another web site based on the server's determination that a redirect should be included, after the server has determined the type of device making the web site request. Additionally, JavaScript may be included in the HEAD section to enable functionality.